{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <form action="{:request()->url()}" class="layui-form" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">销售类别</label>
                <div class="layui-input-block">
                    <select name="classify">
                        <option value="">请选择</option>
                        {foreach name=":\app\user\model\CustomerOrderClassify::get_lists()" item="v"}
                        <option value="{$v.id}" {if condition="isset($data) and $data.classify eq $v.id"}selected="selected"{/if}>{$v.name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">销售金额</label>
                <div class="layui-input-block">
                    <input name="price" placeholder="请输入销售金额" type="number" class="layui-input" value="{$data.price|default=''}" lay-verType="tips" lay-verify="required" required autocomplete="off"/>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">销售备注</label>
                <div class="layui-input-block">
                    <textarea name="remark" placeholder="请输入销售备注" class="layui-textarea">{$data.remark|default=''}</textarea>
                </div>
            </div>
            <!--div class="layui-form-item">
                <label class="layui-form-label">合同图片</label>
                <div class="layui-input-inline" style="width:112px;">
                    <input type="hidden" name="photo">
                    <button type="button" class="layui-btn layui-btn-primary ajax-photos"><i class="fa fa-file-image-o"></i> 选择图片</button>
                </div>
            </div>
            {if condition="!empty($data['photo'])"}
            {foreach name="data.photo" item="v"}
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    <input type="text" name="photo[]" value="{$v}" autocomplete="off" readonly class="layui-input">
                    <button type="button" class="layui-btn layui-btn-primary layui-btn-position delete-photo"><i class="fa fa-times-circle"></i></button>
                </div>
            </div>
            {/foreach}
            {/if}
            -->
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-filter="i" lay-submit="">保存</button>
                    <button class="layui-btn layui-btn-primary" type="reset">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}
{block name="js"}
{/block}